package com.boe.csb.core.dao;

import com.boe.csb.core.entity.po.BoeUser;

import java.util.Date;
import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.session.RowBounds;

public interface BoeUserMapper {
    long countByExample(BoeUserCriteria example);

    int deleteByExample(BoeUserCriteria example);

    int deleteByPrimaryKey(Long id);

    int insert(BoeUser record);

    int insertSelective(BoeUser record);

    List<BoeUser> selectByExampleWithBLOBsWithRowbounds(BoeUserCriteria example, RowBounds rowBounds);

    List<BoeUser> selectByExampleWithBLOBs(BoeUserCriteria example);

    List<BoeUser> selectByExampleWithRowbounds(BoeUserCriteria example, RowBounds rowBounds);

    List<BoeUser> selectByExample(BoeUserCriteria example);

    BoeUser selectByPrimaryKey(Long id);

    int updateByExampleSelective(@Param("record") BoeUser record, @Param("example") BoeUserCriteria example);

    int updateByExampleWithBLOBs(@Param("record") BoeUser record, @Param("example") BoeUserCriteria example);

    int updateByExample(@Param("record") BoeUser record, @Param("example") BoeUserCriteria example);

    int updateByPrimaryKeySelective(BoeUser record);

    int updateByPrimaryKeyWithBLOBs(BoeUser record);

    int updateByPrimaryKey(BoeUser record);

    BoeUser getUserByName(String userName);

    BoeUser getUserByPhone(String phone);

    BoeUser getUserByNameOrPhone(@Param("userName")String userName, @Param("phone") String phone);

    int registNewUser(@Param("userName") String userName, @Param("phone") String phone, @Param("password") String pwd, @Param("gmtCreate") Date gmtCreate);

    Integer getUserActiveStatus(@Param("userId") long userId);

    Long getUserId(@Param("userName") String userName);

    int activeUser(@Param("userId") long userId);

    BoeUser selectUserByUserIdOrEmail(@Param("userId")String userId);
    
    int updateAdminUserPower(@Param("userId")Long userId,@Param("release")String release,@Param("subscribe")String subscribe);
    
    List<String> getReleaseAdminEmail();
    
    List<String> getSubscribeAdminEmail();
    
    List<String> loadApiName(@Param("email") String email);
    
    List<Long> loadBoeUserID(@Param("email") String email);
    
    Map<String,Object> loadBoeUserEmail(@Param("apiName") String apiName);

}